package cc.wsyw126.java.service;

import java.sql.SQLException;

/**
 * Created by junpeng.yang on 16/8/11.
 */
public class TestThrowException {
    public void exception() throws SQLException {
        for (int i = 0; i < 3; i++) {
            try {
                if (1!=2){
                    throw new SQLException();
                }
                break;
            }  catch (SQLException e) {
                if(i==2){
                    try {
                        if (1!=2){
                            throw new IllegalArgumentException();
                        }
                    } catch (IllegalArgumentException e1){
                        throw e;
                    }
                }
            }
        }
    }
}
